﻿using System;
using System.Web.Mvc;

namespace TSites.Administrator.Extensions
{
	public static class UrlHelperExtension
	{
		public static string Home(this UrlHelper helper)
		{
			return helper.Content("~/");
		}

		public static string Logon(this UrlHelper helper)
		{
			return helper.RouteUrl("Logon");
		}

		//public static string Dashboard(this UrlHelper helper)
		//{
		//    return Dashboard(helper, StoryListTab.Unread);
		//}

		//public static string Dashboard(this UrlHelper helper, StoryListTab tab)
		//{
		//    return Dashboard(helper, tab, OrderBy.CreatedAtDescending, 1);
		//}

		//public static string Dashboard(this UrlHelper helper, StoryListTab tab, OrderBy orderBy, int page)
		//{
		//    return helper.RouteUrl("Dashboard", new { tab = tab.ToString(), orderBy = orderBy.ToString(), page });
		//}

		//public static string Update(this UrlHelper helper)
		//{
		//    return helper.RouteUrl("Update");
		//}

		//public static string Submit(this UrlHelper helper)
		//{
		//    return helper.RouteUrl("Submit");
		//}

		/// <summary>
		/// Images folder
		/// </summary>
		/// <param name="helper"></param>
		/// <param name="fileName"></param>
		/// <returns></returns>
		//public static string Image(this UrlHelper helper, string fileName)
		//{
		//    return helper.Content("~/assets/images/{0}".FormatWith(fileName));
		//}

		/// <summary>
		/// css folder
		/// </summary>
		/// <param name="helper"></param>
		/// <param name="fileName"></param>
		/// <returns></returns>
        public static string Stylesheet(this UrlHelper helper, string filePath)
		{
            return helper.Content("~/Content/" + filePath);
		}

		/// <summary>
		/// Icons folder
		/// </summary>
		/// <param name="helper"></param>
		/// <returns></returns>
		//public static string NoIcon(this UrlHelper helper)
		//{
		//    return Image(helper, "noIcon.png");
		//}

		public static string Script(this UrlHelper helper, string filePath)
		{
            return helper.Content("~/Scripts/" + filePath);
		}
	}
}